<template>
  <el-carousel :interval="4000" indicator-position="outside" height="250px" class="carousel">
    <el-carousel-item v-for="item in data" :key="item.id">
      <a :href="item.url" :target="item.target===1?'_blank':''">
        <img class="medium" :src="item.image"/>
      </a>
    </el-carousel-item>
  </el-carousel>
</template>

<script>
export default {
  name: "Carousel",
  props: ['data']
}
</script>

<style scoped lang="less">
.carousel {
  padding: 10px;

  .medium {
    max-width: 100%;
    //height: 100%;
    border-radius: 5px;
  }
}
</style>
